var fontSize = ''; // zmienna globalna - moze przyjac jedna z 3-ech wartosci: small, normal, big
var fontSizeCookieName = 'orlentpl_font_size'; //nazwa cookie dla rozmiaru czcionki
function changeFontSize(newSize) {
if (fontSize != newSize) {
fontSize = newSize;
jQuery.cookie(fontSizeCookieName, fontSize, { expires: 7, path: '/' });
jQuery("#fontSmall, #fontNormal, #fontBig").css('font-weight', 'normal');
jQuery("body").removeClass('fontNormal').removeClass('fontBig');
switch (fontSize) {
case 'small':
jQuery("#fontSmall").css('font-weight', 'bold');
break;
case 'normal':
jQuery("#fontNormal").css('font-weight', 'bold');
jQuery("body").addClass('fontNormal');
break;
case 'big':
jQuery("#fontBig").css('font-weight', 'bold');
jQuery("body").addClass('fontBig');
break;
}
}
}
function checkFontSize() {
var fontSizeCookie;
fontSizeCookie = jQuery.cookie(fontSizeCookieName);
if (fontSizeCookie != null) {
if (fontSizeCookie != 'small') {
changeFontSize(fontSizeCookie);
}
else {
jQuery("#fontSmall").css('font-weight', 'bold');
}
fontSize = fontSizeCookie;
}
else {
fontSize = 'small';
jQuery("#fontSmall").css('font-weight', 'bold');
jQuery.cookie(fontSizeCookieName, fontSize, { expires: 7, path: '/' });
}
}
function getUrlParamByName(name) {
var i, group;
var url = new String(window.location);
var paramsStringWithQ = String(document.location.search);
var urlSplit = url.split("?");
if (urlSplit.length < 2) return "";
paramsString = urlSplit[1];
if (paramsStringWithQ.match(/%20\w+=/)) // jest #
{
groups = paramsString.split(escape("&"));
}
else // nie ma #
{
groups = paramsString.split("&");
}
i = 0;
while (i < groups.length) {
groupString = groups[i];
group = groupString.split("=");
if (group[0] == name) {
return group[1];
}
i++;
}
return "";
}
jQuery(document).ready(function () {
if (jQuery('#siteActions .authoringContainer').children().length < 1) {
jQuery('#siteActions .authoringContainer').hide();
}
jQuery('#fontSmall').click(function () {
changeFontSize('small');
});
jQuery('#fontNormal').click(function () {
changeFontSize('normal');
});
jQuery('#fontBig').click(function () {
changeFontSize('big');
});
checkFontSize();
});
jQuery(function(){
var wp="";
var news=""
var pathname = window.location.pathname;
var lokalizacja=pathname.split("/")
if(lokalizacja[1].toLowerCase()=="lt")
{
jQuery(".menu_box_2.float_left > ul li:nth-child(1) a").attr('href','/LT/Puslapiai/sitemap.aspx');
jQuery(".site_options_inner span").text("Keisti šrifto dydį:");
jQuery(".search_label, a.btn_search_small span").text("Paieška");
jQuery(".float_left.group .orlen_group .group_label").text("GRUPĖ ORLEN");
jQuery(".site_options_inner .float_right span, .site_options_inner span").text("Keisti šrifto dydį: ");
jQuery(".sightless").html("Silpnaregiams");
jQuery("#size").html("Keisti šrifto dydį:");
}
if(lokalizacja[1].toLowerCase()=="en"){
news="News";
}else{
news="Naujienos";
}
jQuery("H4").each(function(){
wp=jQuery(this).html();
wp=wp.replace(/\n/g, "").replace(/\t/g, "").replace(/\s/g, "");
if(wp.indexOf("wp")!=-1){
jQuery(this).html(wp.substring(0, 10)+" | "+news+" ");
//jQuery(this).attr("style","background: url('/Style Library/_img/ico_photo.gif') no-repeat; background-position: right;")
}
});
});
function setCookie(c_name,value,exdays)
{
jQuery.cookie(c_name, value, { expires: 9999, path: '/' });
}
function getCookie(c_name)
{
var i,x,y,ARRcookies=document.cookie.split(";");
for (i=0;i